﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SeachSampleOut.aspx.cs" Inherits="Workflow.Project.SeachSampleOut" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <link type="text/css" rel="stylesheet" href="../Css/pagination.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Scripts/MyJquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.pagination.js"></script>
    <script type="text/javascript" src="../Scripts/Pageination.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }

        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }

        .auto-style2 {
            text-align: right;
            padding-left: 5px;
            background-color: #f5f5f5;
            width: 230px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div style="margin:40px;">
            <asp:DropDownList ID="ddlSelect" runat="server"  AutoPostBack="True" OnSelectedIndexChanged="ddlSelect_SelectedIndexChanged">
                <asp:ListItem Value="1">阶段查询</asp:ListItem>
                <asp:ListItem Value="2">节点查询</asp:ListItem>
                <asp:ListItem Value="3">节点完成率查询</asp:ListItem>
                <asp:ListItem Value="4">样品前置审批查询</asp:ListItem>
                <asp:ListItem Value="5" Selected="True">样品发货查询</asp:ListItem>
                <asp:ListItem Value="6">项目执行进度查询</asp:ListItem>
                <asp:ListItem Value="7">活动查询</asp:ListItem>
            </asp:DropDownList>
        </div>
        <div>
            <table class="table table-bordered table-hover definewidth m10">
                <tr>
                    <td class="auto-style2">Sap号</td>
                    <td class="auto-style1">
                        <asp:TextBox ID="txtSapNo" runat="server"></asp:TextBox></td>
                    
                </tr>
                <tr>
                    <td class="auto-style2"></td>
                    <td class="auto-style1">
                        <asp:Button ID="BtnSubmit" CssClass="btn btn-primary" runat="server" Text="查询" OnClientClick="return Validate()" OnClick="BtnSubmit_Click" /> &nbsp; &nbsp; 
                        <asp:Button ID="Export" CssClass="btn btn-primary" runat="server" Text="导出" OnClick="Export_Click"  />
                    </td>
                    
                </tr>
            </table>
            <% if(resultList.Count>0){ %>
            <table class="table table-bordered definewidth m10">
                
                <thead>
                        <tr>
                            <th>样品订单流水号</th>
                            <th>订单类型</th>
                            <th>样品前置流水号</th>
                            <th>客户</th>
                            <th>销售订单</th>
                            <th>交货单</th>
                            <th>物流凭证</th>
                            <th>行号</th>
                            <th>客户订单号</th>
                            <th>产品编号</th>
                            <th>Sap号</th>
                            <th>描述</th>
                            <th>交货数量</th>
                            <th>备注</th>
                        </tr>
                </thead>
                <tbody id="Searchresult"></tbody>
                <tbody id="hiddenresult" style="display: none">
                    <% for (int i = 0; i < resultList.Count; i++){ %>
                    <tr class="result">
                        <td>
                            <label id="serialNum<%=i %>"><% =resultList[i].SerialNum %></label>
                        </td>
                        <td>
                            <label id="orderType<%=i %>"><% =resultList[i].OrderType %></label>
                        </td>
                        <td>
                            <label id="orderStartSerialNum<%=i %>"><% =resultList[i].OrderStartSerialNum %></label>
                        </td>
                        <td>
                            <label id="customer<%=i %>"><% =resultList[i].Customer %></label>
                        </td>
                        <td>
                            <label id="saleOrder<%=i %>"><% =resultList[i].SaleOrder %></label>
                        </td>
                        <td>
                            <label id="bill<%=i %>"><% =resultList[i].Bill %></label>
                        </td>
                        <td>
                            <label id="bill2<%=i %>"><% =resultList[i].Bill2 %></label>
                        </td>
                        <td>
                            <label id="row<%=i %>"><% =resultList[i].Row %></label>
                        </td>
                        <td><% =resultList[i].CustomerOrder %></td>
                        <td><% =resultList[i].Maktx %></td>
                        <td><% =resultList[i].Rev %></td>
                        <td><% =resultList[i].Description %></td>
                        <td><% =resultList[i].Num %></td>
                        <td><% =resultList[i].Ps %></td>
                    </tr>
                    <% }%>
                </tbody>
            </table>
            <%}%>
            <div id="Pagination" class="pagination definewidth m10"></div>

        </div>
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            var count = "<% =resultList.Count%>";
            if (count >= 10) {
                $("#Pagination").show();
            } else {
                $("#Pagination").hide();
            }
            $(".date").each(function () {
                if ($(this).text() == "1900/01/01" || $(this).text() == "1900/1/1") {
                    $(this).text("");
                }
            });
            $("a").click(function () {
                $(".date").each(function () {
                    if ($(this).text() == "1900/01/01" || $(this).text() == "1900/1/1") {
                        $(this).text("");
                    }
                });
            });
        });
        function List() {
            var count = "<% =resultList.Count%>";
            for (var i = 0; i < count; i++) {
                if ($("#row" + i).text() > 1) {
                    $("#serialNum" + i).text("");
                    $("#orderType" + i).text("");
                    $("#orderStartSerialNum" + i).text("");
                    $("#customer" + i).text("");
                    $("#saleOrder" + i).text("");
                    $("#bill" + i).text("");
                    $("#bill2" + i).text("");
                }
            }
        }
    </script>
</body>
</html>

